package com.zhangtai.modules.service.employee;


import com.zhangtai.modules.dto.EmployeeOverworkDto;
import com.zhangtai.modules.entity.employee.EmployeeOverworkEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


/**
 *
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-12-07 15:29:22
 */

public interface EmployeeOverworkService {

    @GetMapping("/findEmployeeOverworkList")
    @ApiOperation(value = "分页查询")
    PageResult queryPage(@RequestParam(value = "oprationName", required = false) String oprationName,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
            ,@RequestParam(value = "request") HttpServletRequest request) throws Exception;

    PageResult queryPageHr(
            @RequestParam(value = "oprationName", required = false) String oprationName,
            @RequestParam(value = "corpName", required = false) String corpName,
            @RequestParam(value = "orgNname", required = false) String orgNname,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
            ,@RequestParam(value = "request") HttpServletRequest request) throws Exception;

    PageResult queryRecordPage(@RequestParam(value = "name", required = false) String name,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,@RequestParam(value = "request") HttpServletRequest request)throws Exception;


    @GetMapping("/infoEmployeeOverwork")
    @ApiOperation(value = "根据id查找")
    EmployeeOverworkDto getByIdE(@RequestParam("id") Long id);


    @ApiOperation(value = "根据id查找")
    EmployeeOverworkEntity getById(@RequestParam("id") Long id);

    @PostMapping("/saveEmployeeOverwork")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody EmployeeOverworkEntity entity);


    R save(@RequestBody EmployeeOverworkDto employeeOverworkDto,HttpServletRequest request) throws Exception;


    @PostMapping("/updateEmployeeOverwork")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody EmployeeOverworkEntity entity);

    @GetMapping("/deleteOneEmployeeOverwork")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    R deletByIdE(@RequestParam("id") Long id);


    @PostMapping("/deleteEmployeeOverworks")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

